package com.by.service.impl;

import com.by.common.bean.PageBean;
import com.by.mapper.InquiryCustomerMapper;
import com.by.service.InquiryCustomerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author HY
 * @version 1.0
 * @description
 * @date 2025/3/3
 * @since JDK21
 */
@Service
public class InquiryCustomerServiceImpl implements InquiryCustomerService {

    @Autowired
    InquiryCustomerMapper inquiryCustomerMapper;


    @Override
    public PageBean getInquiryCustomerList(int page, int pageSize) {
        PageHelper.startPage(page,pageSize);
        List list = inquiryCustomerMapper.getInquiryCustomerList();
        PageInfo info = new PageInfo(list);
        return new  PageBean(page,pageSize,(int)info.getTotal(),list);

    }
}
